<template>
    <view class="userIndex">
        <view class="uListBox">
            <u-list-item v-for="(item, index) in recordList" :key="index">
                <view class="recordItem" @click="seeQrCodeImg(item)">
                    <view class="dptitle">{{ userInfo.roleName == '商家角色' ? '用户名称：' : '商家名称：' }}</view>
                    <view class="vh-cb">
                        <view class="title">
                            {{ item.name }}
                        </view>

                        <view class="moneyBox vh-c">
                            <image src="../../static/imgs/money.png" mode="aspectFit"></image>
                            <text>{{ item.countNumber }}</text>
                        </view>
                        <!-- <view class="moneyBox vh-c">
                            <image src="../../static/imgs/money.png" mode="aspectFit"></image>
                            <text :style="{ color: (srhx == 1 || userInfo.roleName == '商家角色' ? '#FF0000' : '#ff9f16') }">
                                {{ srhx == 1 || userInfo.roleName == '商家角色' ? '-' : '+' }}{{ item.jine }}</text>
                        </view> -->
                    </view>
                </view>
            </u-list-item>

        </view>
    </view>
</template>

<script>
import { onLogin, phoneNumber } from '@/config/login';
export default {
    data() {
        return {
            status: 'loadmore',
            form: {
                // mobile: 13214060809
            },
            recordList: [],
            showTimePick: false,
            srhx: 0,
            //微信的一些信息
            WeChat: {
                session_key: '',
                openId: '',
                mobile: ''
            },
            showscanImg: false,
            qrCodeImg: '',
            mshow: false,//提示
            mcontent: '',
            sjList: [],
            showdizhi: false,
            searchFrom: {

            },
            userInfoDet: {},
            userInfo: {}
        }
    },
    //页面显示
    onShow() {
        this.userInfo = this.$store.state.userInfo ? this.$store.state.userInfo : ''
        console.log(this.userInfo);
        this.gettuiguangjilu()
    },

    onLoad() {
        this.userInfo = this.$store.state.userInfo ? this.$store.state.userInfo : ''
        uni.hideTabBar();
        let that = this
        // this.loadmore()
        // return
    },
    methods: {
        gettuiguangjilu(type) {
            this.recordList = []
            this.$http.get('/app/user_info/withdrawal_amount/group_by_much/' + this.userInfo.roleId).then(val => {
                console.log(val);
                if (val.data) {
                    this.recordList = val.data
                }
                else {
                    this.recordList = []
                }
            })
        },
    },
}
</script>

<style lang="scss">
.userIndex {
    .uListBox {
        padding-bottom: 8vh;
    }

    .u-list {
        height: calc(100vh - 48vh) !important;
        padding: 0rpx 20rpx 20rpx 20rpx;
    }

    .u-loadmore {
        padding-bottom: 70rpx !important;
    }

    .recordItem {
        padding: 20rpx 40rpx;
        margin-top: 20rpx;
        border: 2px solid #e9f1fc;
        border-radius: 10rpx;

        .dptitle {
            font-size: 24rpx;
            color: #555555;
            line-height: 33rpx;
            margin-bottom: 10rpx;

            span {
                margin-left: 10rpx;
            }
        }

        .title {
            font-size: 32rpx;
            font-weight: 600;
            color: #333333;
            line-height: 45rpx;
        }

        .moneyBox {
            image {
                width: 30rpx;
                height: 30rpx;
                margin-right: 10rpx;
            }

            font-size: 50rpx;
            font-weight: 600;
            color: #ff9f16;
            line-height: 70rpx;

            .u-icon__icon {
                font-size: 30rpx !important;
                font-weight: 6000 !important;
                color: #ff9f16 !important;
                line-height: 70rpx !important;
            }
        }

        .time {
            font-size: 24rpx;
            color: #666;
            font-weight: 300;
            line-height: 33rpx;
        }
    }
}
</style>
